<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>安装程序 - 织梦内容管理系统<?php echo $verMsg; ?></title>
		<link rel="stylesheet" href="skin/css/bootstrap.css">
		<style>
			html,body{font-size:13px;font-family:"Microsoft YaHei UI", "微软雅黑", "宋体";}
			.pager li.previous a{margin-right:10px;}
			.header a{color:#FFF;}
			.header a:hover{color:#428bca;}
			.footer{padding:10px;}
			.footer a,.footer{color:#eee;font-size:14px;line-height:25px;}
			
		</style>
		<!--[if lt IE 9]>
		  <script src="skin/js/html5shiv.min.js"></script>
		  <script src="skin/js/respond.min.js"></script>
		<![endif]-->
<script src="../include/dedeajax2.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
    function $o(tid){
        return document.getElementById(tid);
    }
    function TestDb()
    {
		var dbhost = $o('dbhost').value;
        var dbuser = $o('dbuser').value;
        var dbpwd = $o('dbpwd').value;
		$o('havedbsta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
        var myajax = new DedeAjax($o('dbpwdsta'),false,true,'-','-','...');
        myajax.SendGet2('index.php?step=10&dbhost='+dbhost+'&dbuser='+dbuser+'&dbpwd='+dbpwd);
		DedeXHTTP = null;
		HaveDB();
    }
	
	function HaveDB()
    {
		var dbhost = $o('dbhost').value;
        var dbname = $o('dbname').value;
        var dbuser = $o('dbuser').value;
        var dbpwd = $o('dbpwd').value;
        var myajax = new DedeAjax($o('havedbsta'),false,true,'-','-','...');
        myajax.SendGet2('index.php?step=10&dbhost='+dbhost+'&dbuser='+dbuser+'&dbpwd='+dbpwd+'&dbname='+dbname);
		DedeXHTTP = null;
    }
    
	function GetRemoteDemo()
	{
		
		$o('_remotesta').innerHTML='<img src=\'images/ajax-loader.gif\'>';
		var myajax = new DedeAjax($o('_remotesta'),false,true,'-','-','...');
		myajax.SendGet2('index.php?step=11');
		DedeXHTTP = null;
	}
	
    function DoInstall()
    {
        //$o('postloader').style.display = 'block';
        document.form1.submit();
    }
-->
</script>
	</head>
	<body style="background-color:#28b0e4;">
<form action="index.php" method="post" name="form1" class="form-horizontal">
<input type="hidden" name="step" value="4" />
		<div class="container" style="width:1200px;">
			<div class="header" style="margin:15px auto;">
				<ul class="nav nav-pills pull-right" role="tablist">
					<li role="presentation" class="active"><a href="javascript:;">安装织梦系统</a></li>
					<li role="presentation"><a href="http://www.dedecms.com">织梦官网</a></li>
					<li role="presentation"><a href="http://www.dede58.com">技术支持</a></li>
				</ul>
				<img src="skin/images/logo.png" />
			</div>
			<div class="row well" style="margin:auto 0;">
				<div class="col-xs-2" style="padding:0; width:14%;">
					<div class="progress" title="安装进度">
						<div class="progress-bar progress-bar-info progress-bar-striped active" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 60%;">
							60%
						</div>
					</div>
					<div class="panel panel-default">
						<div class="panel-heading">
							安装步骤
						</div>
						<ul class="list-group">
							<a href="javascript:;" class="list-group-item list-group-item list-group-item-success"><span class="glyphicon glyphicon-copyright-mark"></span> &nbsp; 许可协议</a>
							<a href="javascript:;" class="list-group-item list-group-item list-group-item-success"><span class="glyphicon glyphicon-eye-open"></span> &nbsp; 环境监测</a>
							<a href="javascript:;" class="list-group-item list-group-item-info"><span class="glyphicon glyphicon-cog"></span> &nbsp; 参数配置</a>
							<a href="javascript:;" class="list-group-item"><span class="glyphicon glyphicon-cloud"></span> &nbsp; 正在安装</a>
							<a href="javascript:;" class="list-group-item"><span class="glyphicon glyphicon-ok"></span> &nbsp; 成功</a>
						</ul>
					</div>
				</div>
				<div class="col-xs-10">
						

		
		<div class="panel panel-default">
			<div class="panel-heading">数据库选项</div>
			<div class="panel-body">
            
            
                <div class="form-group">
					<label class="col-sm-2 control-label">数据库类型</label>
					<div class="col-sm-4">
                    <select name="dbtype">
                	<option value="mysql" selected>MySQL</option>
                	
                    </select>
                    
					</div> 
				</div>
                
				<div class="form-group" style="clear:both">
					<label class="col-sm-2 control-label">数据库主机</label>
					<div class="col-sm-4">
						<input class="form-control" type="text" name="dbhost" id="dbhost" value="localhost">
					</div> <span>一般为localhost</span>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">数据库用户</label>
					<div class="col-sm-4">
						<input class="form-control" type="text" name="dbuser" id="dbuser" value="root">
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">数据库密码</label>
					<div class="col-sm-4">
                        <input name="dbpwd" id="dbpwd" type="text" class="form-control" onChange="TestDb()" />
					</div>
                    <div style='float:left' id='dbpwdsta'></div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">表前缀</label>
					<div class="col-sm-4">
                         <input name="dbprefix" id="dbprefix" type="text" value="dede_"  class="form-control" />
                        
					</div>
                     <span>如无特殊需要,请不要修改</span>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">数据库名称</label>
					<div class="col-sm-4">
                        <input name="dbname" id="dbname" type="text" value="<?php echo $dfDbname; ?>" class="form-control" onChange="HaveDB()" />
					</div>
                    <div style='float:left' id='havedbsta'></div>
				</div>
                
                <div class="form-group">
					<label class="col-sm-2 control-label">数据库编码</label>
					<div class="col-sm-4">
                         <?php
                        if($s_lang=='utf-8')
                        {
                        ?>
                        <input type="radio" name="dblang" id="dblang_utf8" value="utf8" checked="checked" /><label for="dblang_latin1">UTF8</label>
                        <?php
                        }
                        else
                        {
                        ?>
                        <input type="radio" name="dblang" id="dblang_gbk" value="gbk" checked="checked" /><label for="dblang_gbk">GBK</label>
                        <input type="radio" name="dblang" id="dblang_latin1" value="latin1" /><label for="dblang_latin1">LATIN1</label>
                        <?php
                        }
                        ?>
                         <span>仅对4.1+以上版本的MySql选择</span>
					</div>
                   
				</div>
                
			</div>
		</div>
		<div class="panel panel-default">
			<div class="panel-heading">管理选项</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-2 control-label">管理员账号</label>
					<div class="col-sm-4">
                        <input name="adminuser" type="text" value="admin" class="form-control" />
					</div>
                    <p><small>只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以内范围的字符</small></p>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">管理员密码</label>
					<div class="col-sm-4">
                        <input name="adminpwd" type="text" value="admin" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">Cookie加密码</label>
					<div class="col-sm-4">
                        <input name="cookieencode" type="text" value="<?php echo $rnd_cookieEncode; ?>" class="form-control" />
					</div>

				</div>
			</div>
		</div>
		
        
        <div class="panel panel-default">
			<div class="panel-heading">网站设置</div>
			<div class="panel-body">
				<div class="form-group">
					<label class="col-sm-2 control-label">网站名称</label>
					<div class="col-sm-4">
                        <input name="webname" type="text" value="我的网站" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">管理员邮箱</label>
					<div class="col-sm-4">
                        <input name="adminmail" type="text" value="admin@dedecms.com" class="form-control" />
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">网站网址</label>
					<div class="col-sm-4">
                        <input name="baseurl" type="text" value="<?php echo $baseurl; ?>" class="form-control" />
					</div>
				</div>
                <div class="form-group">
					<label class="col-sm-2 control-label">CMS安装目录</label>
					<div class="col-sm-4">
                        <input name="cmspath" type="text" class="form-control" value="<?php echo $basepath; ?>" />
					</div>
                    <span>在根目录安装时不必理会</span>
				</div>
			</div>
		</div>
        
        
		<ul class="pager">
			<li class="previous"><a href="javascript:;" onclick="window.location.href='index.php?step=2';"><span class="glyphicon glyphicon-chevron-left"></span> 返回</a></li>
			<li class="previous"><a href="javascript:;" onclick="DoInstall();">开始安装 <span class="glyphicon glyphicon-chevron-right"></span></a></li>
		</ul>


				</div>
			</div>
			<div class="footer" style="margin:15px auto;">
				<div class="text-center">
				
				</div>
				<div class="text-center">
					Powered by <a href="http://www.dedecms.com"><b>织梦CMS</b></a> 加固版 &copy; 2019 by <a href="http://www.dede58.com">Dede58</a> 分享
				</div>
			</div>
		</div>
		<script src="skin/js/jquery-1.11.1.min.js"></script>
		<script src="skin/js/bootstrap.min.js"></script>
        </form>
	</body>
</html>